<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?>
<?php list($upload_js,$upload_htm)=admin_upload_pic_list(array(
	'title'=>'栏目图片',
	'thumb'=>'',
	'record'=>isset($rs)?$rs:null
	))?>
<script language="JavaScript" type="text/javascript">
function page_load(){
	dialog_size(860);
	$(".form input:first").focus();
	dialog_editor("#content");
	<?=$upload_js?>
}
</script>
<?=form_open("$title/put/$id")?>
<div class="dialog-title">
<h2>编辑<?=$caption?></h2>
<span><a href="javascript:close_dialog();">关闭 [X]</a></span>
</div>
<?=validation_errors('<div class="warning">','</div>')?>
<div class="form">
<ul class="halfside">
	<li>中文标题<br />
		<?=form_edit_input('title',$rs,'class="text"')?></li>
	<li>英文标题<br />
		<?=form_edit_input('title_en',$rs,'class="text"')?></li>
	<i class="clear"></i>
	<li>前台链接<br />
		<?=form_edit_input('fronturl',$rs,'class="text"')?></li>
	<li>所属模块<br />
		<?=form_dropdown('url',$this->lang->line('model'),set_edit_value('url',$rs))?></li>
	<i class="clear"></i>
	<li>链接目标<br />
		<label><?=form_edit_radio('targets','_self',$rs)?>Self</label>
		&nbsp;&nbsp;
		<label><?=form_edit_radio('targets','_blank',$rs)?>Blank</label>
    </li>
	<li>链接类型<br />
		<label><?=form_edit_radio('internal',1,$rs)?>站内</label>
		&nbsp;&nbsp;
		<label><?=form_edit_radio('internal',0,$rs)?>外链</label>
		&nbsp;&nbsp;
		<label><?=form_edit_checkbox('ajax',1,$rs)?>Ajax</label></li>
	<i class="clear"></i>
	<li>类别<br />
		<?=form_dropdown('parent_id',$id_tree,set_edit_value('parent_id',$rs))?></li>
	<li>位置<br />
	<?php $arr_location=array(1=>'子类',2=>'类别之前',3=>'类别之后'); ?>
		<?=form_dropdown('move_des',$arr_location,1)?></li>
    <i class="clear"></i>
	<li>前台可见<br />
		<label><?=form_edit_radio('is_front_show',1,$rs)?>是</label>
		&nbsp;&nbsp;
		<label><?=form_edit_radio('is_front_show',0,$rs)?>否</label>
    </li>
	<!--<li>后台可见<br />
		<label><? //=form_edit_radio('is_back_show',1,$rs)?>是</label>
		&nbsp;&nbsp;
		<label><? //=form_edit_radio('is_back_show',0,$rs)?>否</label>
    </li>-->
</ul>
<?=$upload_htm?>
<i class="clear"></i>
<p>栏目内容<br />
	<?=form_textarea('content',set_edit_value('content',$rs),'id="content"')?>
</p>
</div>
<div class="dialog-bottom">
	<div class="dbleft">
		<a href="javascript:close_dialog();" class="button"><span>&nbsp; 取消 &nbsp;</span></a>
	</div>
	<div class="dbright">
		<span class="submit"><input type="submit" value="保存信息" /></span>
	</div>
	<i class="clear"></i>
</div>
<?=form_close()?>